package cn.psvmc.cxzapi.model.store;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 收支账单表
 * @Author auto
 * @Date 2024-08-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_account_bill")
public class TAccountBill implements Serializable {

    //收支账单id
    @TableId(value = "abid", type = IdType.AUTO)
    private Integer abid;

    //所属商家id
    @TableField("storeid")
    private Integer storeid;

    //账户id
    @TableField("account_id")
    private Integer accountId;

    //账户类型（1租金账户2质保金账户）
    @TableField("account_type")
    private Integer accountType;

    //交易类型（1充值 2提现 3交易）
    @TableField("type")
    private Integer type;

    //交易子类（11租金账户充值 12质保金账户充值 21租金账户提现 22质保金账户提现 30佣金 31租金 32取消订单退款 33订单退款 34账单退款）
    @TableField("child_type")
    private Integer childType;

    //收支类型（1收入 2支出）
    @TableField("inout_type")
    private Integer inoutType;

    //交易类型（0账单租金结算 1平台分账）
    @TableField("trade_type")
    private Integer tradeType;

    //交易金额
    @TableField("amount")
    private Double amount;

    //交易后金额
    @TableField("balance")
    private Double balance;

    //订单号
    @TableField("order_code")
    private String orderCode;

    //流水号
    @TableField("transaction_id")
    private String transactionId;

    //期数
    @TableField("period")
    private Integer period;

    //备注
    @TableField("comm")
    private String comm;

    //创建人id
    @TableField(value = "createid", fill = FieldFill.INSERT)
    private Integer createid;

    //创建时间
    //@TableField(value = "createtime", fill = FieldFill.INSERT)
    private LocalDateTime createtime;

    //平台金额
    @TableField(exist = false)
    private Double platformAmount;

    //支付金额
    @TableField(exist = false)
    private Double payAmount;

    @TableField(exist = false)
    private Integer orderId;


}
